import Vue from 'vue'
import Router from 'vue-router'
import HomePage from '@/components/HomePage'
import formPage from '@/components/form/formPage'
import tablePage from '@/components/table/tablePage'
import treePage from '@/components/tree/treePage'
Vue.use(Router)

export default new Router({
  routes: [{
    path: '/',
    name: 'HomePage',
    component: HomePage,
    redirect: 'formPage',
    children: [{
      name: 'formPage',
      path: 'formPage',
      meta: {
        title: '表单组件',
        requireAuth: true
      },
      component: formPage
    },
    {
      name: 'tablePage',
      path: 'tablePage',
      meta: {
        title: '表格组件',
        requireAuth: true
      },
      component: tablePage
    },
    {
      name: 'treePage',
      path: 'treePage',
      meta: {
        title: '树形控件',
        requireAuth: true
      },
      component: treePage
    }
    ]
  }]
})
